home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d18 / printr3.arc / DEMO.PAS < prev    next >
Pascal/Delphi Source File  |  1991-04-28  |  3KB  |  81 lines

  1.   (***********************************************************************)
  2.   (*                                                                     *)
  3.   (*                            Mesa Software                            *)
  4.   (*                       3302 Fourth Ave, Suite 101                    *)
  5.   (*                          San Diego, Ca. 92103                       *)
  6.   (*                                                                     *)
  7.   (*                                                                     *)
  8.   (*       Program :    Report-hdr;          File Name :  RPT-HDR.PAS    *)
  9.   (*                                                                     *)
  10.   (*       Release :    Version 1.0               Date : April 24,1989   *)
  11.   (*                                                                     *)
  12.   (*                                                                     *)
  13.   (*                                                                     *)
  14.   (***********************************************************************)
  15.  
  16.  
  17.       Program Report_Header;
  18.  
  19.  
  20.  
  21.         {$M 8192,20000,65000}           { Leave memory for child process }
  22.  
  23.  
  24.           {file name is rpt-hdr.pas}
  25.            uses crt,dos,printr2,miscttt;
  26.  
  27.      var
  28.        Co_nam,addrs,City,State,Zip,Phone,
  29.        Report_Title,page                    : String;
  30.        pag_num,screen_countr                : integer;
  31.        test_error_num,test_num              : word;
  32.        test_error_manager                   : boolean;
  33.  
  34.      begin
  35.        Co_nam := 'Mesa Software';
  36.        addrs  := '3302 Fourth Avenue';
  37.        City   := 'San Diego,';
  38.        State  := 'California';
  39.        zip    := '92103';
  40.        Phone  := '1(555)555-5555';
  41.        Report_Title := 'Accounts Receivable Aging Report';
  42.        pag_num := 1;
  43.  
  44.       (* We have given an error number of 157 to demo then Function IO_NOT_OK
  45.         Function. In real life, you should be careful of
  46.  
  47.          {$M 8192,20000,65000}           { Leave memory for child process }
  48.  
  49.         memory management.
  50.       *)
  51.  
  52.       Test_error_manager := False;
  53.       if test_error_manager then
  54.       begin
  55.         test_error_num := 157;
  56.         if (IO_NOT_OK(test_error_num)) then
  57.           exit;
  58.       end;
  59.  
  60.       clrscr;
  61.       for screen_countr := 1 to 11 do
  62.         writeln;
  63.       writeln('              The below is an example of GetSystemdate, Hit Return ');
  64.       writeln('                         ',getsystemdate);
  65.       readln;
  66.       writeln;
  67.       writeln('              The below is an example of NumToStr, Hit Return');
  68.       test_num := 45678;
  69.       writeln('                     ' ,NumToStr(test_num));
  70.       readln;
  71.       writeln;
  72.       writeln('              We will now print a banner and report header, Hit Return');
  73.       readln;
  74.       str(pag_num,page);
  75.       if printer_on then
  76.       begin
  77.          Banner(Co_nam,Addrs,City,State,Zip,Phone,Report_Title);
  78.          Report_Hdr(Report_Title,Co_nam,Addrs,City,State,Zip,page);
  79.       end;
  80.     end.
  81.